package ca.cbc.msb.util;

import ca.cbc.msb.entity.MSBMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author : Arash Bizhanzadeh <arash.bizhanzadeh@cbc.ca>
 *         Date: 11-09-23
 *         Time: 12:47 PM
 *         CBC.ca All rights reserved.
 */
public enum ProgressReport {
    instance;
    private static Logger logger = LoggerFactory.getLogger("progress");

    public void report(String s){
        logger.info(s);
    }


    public void report(String s, Object o){
        logger.info(s,o);
    }

    public void statusReport(MSBMessage message, String status){
        if(message.getMedia()!=null){
            logger.info("{}  status :{}",String.valueOf(message.getMedia().getReleaseId())+ "-"+ message.getMedia().getTitle(), status );
        } else {
            logger.info("{}  status :{}",String.valueOf(message.getNotification().getReleaseId())+ "-" +    message.getNotification().getId(), status );
        }

    }
}
